<?php
// $Id: Notification.php 27 2010-11-16 12:49:54Z mjohnson60@gmail.com $


/**
 * Enter description here ...
 * 
 * @author Mark Phillip Johnson
 * @version 1.0
 * @copyright Copyright (c) 2010, markjohnson
 * @license http://www.gnu.org/licenses/gpl.html The GNU General Public License v3.0
 *
 */
class Notification extends Object
{
	/**
	 * @var string Enter description here ...
	 */
	var $name = '';
	
	/**
	 * @var Object Enter description here ...
	 */
	var $object = NULL;
	
	/**
	 * @var array Enter description here ...
	 */
	var $userInfo = array();

	/**
	 * Enter description here ...
	 * 
	 * @param string $name
	 * @param Object $object
	 * @param array $userInfo
	 */
	public function __construct(string $name, Object $object, array $userInfo = array())
	{
		$this->name = $name;
		$this->object = $object;
		
		if (!empty($userInfo))
		{
			$this->userInfo = $userInfo;
		}
		
		parent::__construct();
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $name
	 * @param Object $object
	 * @return Notification
	 */
	public static function notificationWithNameAndObject(string $name, array $object)
	{
		return new Notification($name, $object);
	}

	/**
	 * Enter description here ...
	 * 
	 * @param string $name
	 * @param Object $object
	 * @param array $userInfo
	 * @return Notification
	 */
	public static function notificationWithNameObjectAndUserInfo(string $name, Object $object, array $userInfo)
	{
		return new Notification($name, $object, $userInfo);
	}
}
